import java.util.Arrays;

/**
 * @author: gao
 * @create-date: 2025/3/7 12:54
 */

public class Sort {
    public void InsertSort(int[] array) {
        for (int i = 1; i < array.length; i++) {
            int tmp = array[i];
            int j = i - 1;
            for (; j >= 0; j--) {
                if (array[j] > tmp) {
                    array[j + 1] = array[j];
                } else {

                    break;
                }
            }
            array[j + 1] = tmp;
        }
    }
}